using Godot;

namespace Arcane.Source
{
    public interface IView
    {
        Control UI { get; }
        Node Node { get; } // null if View is a pure UI View.
        Color? ClearColor { get => null; }

        GameOS Os { set; }

        void OnMount() { }
        void OnUnmount() { }
        void OnFree() { }

        public void QueueFree()
        {
            Os = null;
            
            OnFree();

            Node?.QueueFree();
            UI?.QueueFree();
        }
    }
}